package com.china_tanyo.greendaolearn;

import android.app.Application;
import android.database.sqlite.SQLiteDatabase;

import com.china_tanyo.greendaolearn.db.DaoMaster;

/**
 * Created by gushi on 2017/11/6.
 */

public class MyApplication extends Application {

    public static DaoMaster DB = null;

    @Override
    public void onCreate () {
        DaoMaster.DevOpenHelper openHelper = new DaoMaster.DevOpenHelper(this.getApplicationContext(), "myTestDB");
        SQLiteDatabase db = openHelper.getWritableDatabase();
        DB = new DaoMaster(db);
    }
}
